<lightMap>
<div ref="lightMapChart" style="height: 500px;width: 100%;"></div>
	<script>
		const echarts = require('echarts');
		require('echarts/map/js/world.js');
		require('echarts/map/js/china.js');
		let tag = this;

		tag.on('mount', function() {
			tag.myChart = echarts.init(tag.refs.lightMapChart);
			console.log('lightMapChart mount', tag.opts.data);
			tag.initMap(tag.myChart, tag.opts.data);
		});

		tag.on('update', function() {
			console.log('lightMapChart update', tag.opts.data);
			tag.initMap(tag.myChart, tag.opts.data);
		});
		tag.initMap = function(myChart, data) {
			myChart.showLoading();
			if (!data) {
				return;
			}
			myChart.hideLoading();
			myChart.setOption({
				backgroundColor: '#404a59',
				tooltip: {},
				legend: {
					left: 'left',
					data: ['强', '中', '弱'],
					textStyle: {
						color: '#ccc'
					}
				},
				geo: {
					map: 'china',
					label: {
						emphasis: {
							show: false
						}
					},
					itemStyle: {
						normal: {
							areaColor: '#323c48',
							borderColor: '#111'
						},
						emphasis: {
							areaColor: '#2a333d'
						}
					}
				},
				series: [{
					name: '弱',
					type: 'scatter',
					coordinateSystem: 'geo',
					symbolSize: 1,
					large: true,
					itemStyle: {
						normal: {
							shadowBlur: 2,
							shadowColor: 'rgba(37, 140, 249, 0.8)',
							color: 'rgba(37, 140, 249, 0.8)'
						}
					},
					data: data[0]
				}, {
					name: '中',
					type: 'scatter',
					coordinateSystem: 'geo',
					symbolSize: 1,
					large: true,
					itemStyle: {
						normal: {
							shadowBlur: 2,
							shadowColor: 'rgba(14, 241, 242, 0.8)',
							color: 'rgba(14, 241, 242, 0.8)'
						}
					},
					data: data[1]
				}, {
					name: '强',
					type: 'scatter',
					coordinateSystem: 'geo',
					symbolSize: 1,
					large: true,
					itemStyle: {
						normal: {
							shadowBlur: 2,
							shadowColor: 'rgba(255, 255, 255, 0.8)',
							color: 'rgba(255, 255, 255, 0.8)'
						}
					},
					data: data[2]
				}]
			});
		}
	</script>
</lightMap>